from apps import create_app
from flask_script import Manager
from flask_migrate import Migrate, MigrateCommand

from exts import db

app = create_app()
# 构建命令
manager = Manager(app=app)
# 将db交给manager
migrate = Migrate(app=app, db=db)
manager.add_command('db', MigrateCommand)
if __name__ == '__main__':
    manager.run()

